#{extends 'main.html' /}

#{set title:'Liste de vos candidatures' /}
<a href="@{Candidats.gestionCandidatures}">Gérer les candidatures > </a> Validation des candidatures
#{if candidatures}
<div class="post">
    <div class="post">
        <h2 class="post-title">
            Liste des candidatures pour le stage: ${stage.intitule}
        </h2>
         #{form @gestionCandidatureSave(params.get("stageId"))} 
            <input type="hidden" id="numEtat" name="numEtat" value="7" />
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="liste"> 
                <thead>
                    <tr>
                        <th>CIS Service</th>
                        <th>Nom</th>
                        <th>Prenom</th>	
                        <th>Grade</th>
                        <th>Rôle</th>
                        <th>Etat</th>
                        <th>Gestion du candidat</th>			
                    </tr>
                </thead>		

                <tbody>
                    #{list items:candidatures, as:'candidature' }
                        <tr>
                            <td>${candidature.agent.cisService}</td>
                            <td>${candidature.agent.nom}</td>
                            <td>${candidature.agent.prenom}</td>
                            <td>${candidature.agent.grade}</td>
                            <td>${candidature.role}</td>
                            <td>${candidature.etatCandid}</td>
                           
                            <td>
                                <input type="radio" name="validation_${candidature.id}" id="validation_${candidature.id}" value="validee" onmousedown="this.__chk = this.checked" onclick="if (this.__chk) this.checked = false" />Validé
                                <input type="radio" name="validation_${candidature.id}" id="validation_${candidature.id}" value="annulee" onmousedown="this.__chk = this.checked" onclick="if (this.__chk) this.checked = false" checked="true"/>Annulé
                                <input type="radio" name="validation_${candidature.id}" id="validation_${candidature.id}" value="listeAttente" onmousedown="this.__chk = this.checked" onclick="if (this.__chk) this.checked = false" />Liste d'attente
                            </td>
                    </tr>
                    #{/list}

                </tbody>
            </table>
            <br />
            <input type="submit" value="Enregistrer" />
        #{/form}
    </div>
</div>    
#{/if}

#{else}
<div class="empty">
    <p>Aucune candidature présente.</p>
</div>
#{/else}
